function [posChunk]=chunk(dataX,id)
posChunk(1)=1;
for i=2:length(dataX)
    a=dataX(i)-dataX(i-1);
    if ~((a==1)||(a==-3))||id(i)~=id(i-1)
        posChunk=[posChunk;i];
    end
end
posChunk(length(posChunk)+1)=length(dataX)+1;